﻿<%@ Page Title="配送企业汇总统计" Language="C#" MasterPageFile="~/Master/MasterPage_New.master" AutoEventWireup="true" CodeBehind="CompanyPSL_PS23J.aspx.cs" Inherits="HZ.Supervise.Web.Secondphase.NewReport.CompanyPSL_PS23J" %>

<%@ Register Src="~/Common/QueryControl.ascx" TagName="QueryControl" TagPrefix="uc1" %>
<%@ Register Src="~/Common/AreaControls.ascx" TagName="AreaControl" TagPrefix="uc3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <script language="javascript" type="text/javascript">
        //    回车查询  
        //    by张雄
        function document.onkeydown() {
            //使用document.getElementById获取到按钮对象
            var btnQuery = document.getElementById('<%=btn_chaxun.ClientID%>');
            if (event.keyCode == 13) {
                btnQuery.click();
                event.returnValue = false;
            }
        }

        function ShowImg() {
            var img = document.getElementById("ctl00_ContentPlaceHolder1_divTable");
            var button = document.getElementById("btnShowImg");

            if (img.style.display == 'block') {
                img.style.display = 'none';
                button.value = '显示县区数据';
            }
            else {
                img.style.display = 'block';
                button.value = '隐藏县区数据';
            }
        }
        
    </script>

    <div id="tabnav">
        <ul>
            <li><a href="CompanyPSL_PS.aspx">全部医疗机构汇总统计</a></li>
            <li class="active"><a href="CompanyPSL_PS23J.aspx">二、三级医疗机构汇总统计</a></li>
            <li><a href="CompanyPSL_PSJC.aspx">基层医疗机构汇总统计</a></li>
            <li><a href="CompanyPSL_PSXZ.aspx">乡镇医疗机构汇总统计</a></li>
            <li><a href="CompanyPSL_PSSQ.aspx">社区医疗机构汇总统计</a></li>
        </ul>
    </div>
    <div id="tabcontent">
        <table class="querylist">
            <tr>
                <td>
                    <table class="querylist">
                        <tr>
                            <td align="right">
                                配送企业：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtCompanyName_PS" runat="server"></asp:TextBox>
                            </td>
                            <td align="right">
                                所在地区：
                            </td>
                            <td align="left">
                                <%--<asp:DropDownList ID="ddlCity" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlCity_SelectedIndexChanged">
                                </asp:DropDownList>
                                <asp:DropDownList ID="ddlCountry" runat="server">
                                </asp:DropDownList>--%>
                                <uc3:AreaControl ID="AreaControl1" runat="server" />
                            </td>
                           
                       
                            <td align="right">
                                排序字段：
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="OrderFileds" runat="server">
                                <asp:ListItem Value=DistributeCountRate>配送率</asp:ListItem>
                                    <asp:ListItem Value="CompanyID">配送企业</asp:ListItem>
                                    <asp:ListItem Value="PurchaseAmountTotal">采购金额(元)</asp:ListItem>
                                    <asp:ListItem Value="DistributeAmountTotal" Selected="True">配送金额(元)</asp:ListItem>
                                    <asp:ListItem Value="WarehouseCountTotal">销售金额(元)</asp:ListItem>
                                    <asp:ListItem Value="WareHouseRate">销售率</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                             </tr>
                        <tr>
                            <td align="right">
                                排序方式：
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="OrderType" runat="server">
                                    <asp:ListItem Value="DESC">降序</asp:ListItem>
                                    <asp:ListItem Value="ASC">升序</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                             <td align="right">
                            <asp:Label ID="labPlanTime" runat="server" Text="采购时间："></asp:Label>
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtStratTime" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})"
                                Width="63px"></asp:TextBox>-<asp:TextBox ID="txtEndTime" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})"
                                    Width="63px"></asp:TextBox>
                        </td>
                        </tr>
                         
                    </table>
                </td>
                <td width="100px">
                    <asp:Button ID="btn_chaxun" runat="server" Text="查  询" CssClass="btn" OnClick="btn_chaxun_Click" />
                </td>
            </tr>
        </table>
    </div>
    <asp:GridView ID="gvwPSLInfo" runat="server" AutoGenerateColumns="False" CssClass="mainlist"
        AllowSorting="True" EmptyDataText="暂无符合条件的数据！">
        <Columns>
            <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                    <%#Container.DataItemIndex + 1 + AspNetPager_CompanyPSL_hz_PS.PageSize * (AspNetPager_CompanyPSL_hz_PS.CurrentPageIndex - 1)%></ItemTemplate>
                <HeaderStyle Width="30px" />
            </asp:TemplateField>
            <asp:BoundField DataField="CompanyName" HeaderText="配送企业" />
            <asp:BoundField DataField="PurchaseAmountTotal" HeaderText="采购金额" DataFormatString="{0:F3}" />
            <asp:BoundField DataField="DistributeAmountTotal" HeaderText="配送金额" DataFormatString="{0:F3}" />
            <asp:BoundField DataField="DistributeCountRate" HeaderText="配送率" DataFormatString="{0:P2}"
                NullDisplayText="NA" />
                
            <asp:BoundField DataField="WarehouseCountTotal" HeaderText="销售金额" DataFormatString="{0:F3}" />
            <asp:BoundField DataField="WareHouseRate" HeaderText="销售率" DataFormatString="{0:P2}"
                NullDisplayText="NA" />
        </Columns>
    </asp:GridView>
    <div class="page">
        <span style="width: 30%; float: left; text-align: left">
            <hz:HzButton ID="btnExcel1" runat="server" CssClass="btn" Text="导出数据" OnClick="btnExcel1_Click" />
             <input id="btnShowImg" class="btn" onclick="ShowImg()" value="显示县区数据" style="height: 15px" />
        </span><span style="width: 70%; text-align: right; float: right">
            <webdiyer:AspNetPager ID="AspNetPager_CompanyPSL_hz_PS" runat="server" AlwaysShow="true"
                OnPageChanged="AspNetPager_CompanyPSL_hz_PS_PageChanged">
            </webdiyer:AspNetPager>
        </span>
    </div>
    <br />
    <br />
    <div id="divTable" runat="server" style="display: none">
        <asp:GridView ID="gvwxianquInfo" runat="server" AutoGenerateColumns="False" CssClass="mainlist"
            AllowSorting="True" EmptyDataText="暂无符合条件的数据！">
            <Columns>
                <asp:TemplateField HeaderText="序号">
                    <ItemTemplate>
                        <%#Container.DataItemIndex + 1 + AspNetPager_CompanyPSL_PS.PageSize * (AspNetPager_CompanyPSL_PS.CurrentPageIndex - 1)%></ItemTemplate>
                    <HeaderStyle Width="30px" />
                </asp:TemplateField>
                <asp:BoundField DataField="CompanyName" HeaderText="配送企业" />
            <asp:BoundField DataField="PurchaseAmountTotal" HeaderText="采购金额" DataFormatString="{0:F3}" />
            <asp:BoundField DataField="DistributeAmountTotal" HeaderText="配送金额" DataFormatString="{0:F3}" />
            <asp:BoundField DataField="DistributeCountRate" HeaderText="配送率" DataFormatString="{0:P2}"
                NullDisplayText="NA" />
                
            <asp:BoundField DataField="WarehouseCountTotal" HeaderText="销售金额" DataFormatString="{0:F3}" />
            <asp:BoundField DataField="WareHouseRate" HeaderText="销售率" DataFormatString="{0:P2}" />
                <asp:BoundField DataField="areaname" HeaderText="地区名称" />
            </Columns>
        </asp:GridView>
        <div class="page">
            <span style="width: 30%; float: left; text-align: left">
                <hz:HzButton ID="btnExcel" runat="server" CssClass="btn" Text="导出数据" OnClick="btnExcel_Click" />
            </span><span style="width: 70%; text-align: right; float: right">
                <webdiyer:AspNetPager ID="AspNetPager_CompanyPSL_PS" runat="server" OnPageChanged="CompanyPSL_PS_PageChanged"
                    AlwaysShow="True">
                </webdiyer:AspNetPager>
            </span>
        </div>
    </div>
  
    <br />
    <div class="listip">
        <ul>
            <li>说明:<span><font>(1)此功能查询为静态查询当天以前的配送企业药品配送情况。<br />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(2)第一个表格是不分地区的汇总数据，第二个表格是各地区的汇总数据。<br />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(3)点击按钮可查看区县表格。 </font></span>
            </li>
        </ul>
    </div>
</asp:Content>
